#include "qvcursor.h"
#include "qvcursorplugin.h"

#include <QtPlugin>

QVCursorPlugin::QVCursorPlugin(QObject *parent)
        : QObject(parent)
{
    initialized = false;
}

void QVCursorPlugin::initialize(QDesignerFormEditorInterface *)
{
    if (initialized)
        return;

    initialized = true;
}

bool QVCursorPlugin::isInitialized() const
{
    return initialized;
}

QWidget *QVCursorPlugin::createWidget(QWidget *parent)
{
    return new QVCursor(parent);
}

QString QVCursorPlugin::name() const
{
    return "QVCursor";
}

QString QVCursorPlugin::group() const
{
    return "Lab Widgets";
}

QIcon QVCursorPlugin::icon() const
{
    return QIcon(":qvcursor.png");
}

QString QVCursorPlugin::toolTip() const
{
    return "";
}

QString QVCursorPlugin::whatsThis() const
{
    return "";
}

bool QVCursorPlugin::isContainer() const
{
    return false;
}

QString QVCursorPlugin::domXml() const
{
    return "<widget class=\"QVCursor\" name=\"qvcursor\">\n"
           " <property name=\"geometry\">\n"
           "  <rect>\n"
           "   <x>0</x>\n"
           "   <y>0</y>\n"
           "   <width>50</width>\n"
           "   <height>265</height>\n"
           "  </rect>\n"
           " </property>\n"
           " <property name=\"toolTip\" >\n"
           "  <string>Vertical slider</string>\n"
           " </property>\n"
           " <property name=\"whatsThis\" >\n"
           "  <string>Vertical slider</string>\n"
           " </property>\n"
           " </widget>\n";
}

QString QVCursorPlugin::includeFile() const
{
    return "qvcursor.h";
}

Q_EXPORT_PLUGIN2(customwidgetplugin, QVCursorPlugin)
